/**
 * 
 * @author 捣蛋鬼x
 *
 */
	public class EdgeData {

		private int capacity;
		private int flow;

		public EdgeData(){
			this.capacity = 1;
			this.flow = 0;
		}
/**
 * Data of each edge
 * @param capacity---max capacity
 * @param flow---current flow
 * @throws Exception
 */
		public EdgeData(int capacity, int flow) throws Exception{
			if(capacity<flow || flow<0 || capacity<0)
				throw new IndexOutOfBoundsException();
			this.capacity = capacity;
			this.flow = flow;
		}
/**
 * Available flows in augment
 * @return
 */
		public int getAvailable() {
			return this.capacity - flow;
		}


		public int getCapacity(){
			return this.capacity;
		}


		public int getFlow(){
			return this.flow;
		}


		public void setFlow(int flow) throws Exception{
			if(this.capacity<flow || flow<0)
				throw new IndexOutOfBoundsException();
			this.flow = flow;
		}
	}
